book.h
//顺序表的动态存储
#pragma warning(disable:4996)
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
typedef struct Sequence_List
{
        int* array;//动态指针（int*实为type*）
        size_t cur_size;//有效数据长度
        size_t capacity;//容量空间大小
}Sq_List;
#define Initcapacity 10
//直接写Sq_List* sqlist：函数声明可以不写具体参数名，只写类型即可
//所传实参应为(结构体地址,初始化容量大小)
extern void Sq_List_Init(Sq_List* sqlist, int initcapacity);//顺序表的初始化
extern void Check_Capacity(Sq_List* sqlist, int initcapacity);//检查顺序表是否需要扩容
extern void Sq_List_In_Back(Sq_List* sqlist, int initcapacity, int date);//顺序表尾插
extern void Sq_List_Del_Back(Sq_List* sqlist);//顺序表尾删
extern void Sq_List_In_Head(Sq_List* sqlist, int initcapacity, int date);//顺序表头插;
extern void Sq_List_Del_Head(Sq_List* sqlist);//顺序表头删
extern void Sq_List_Del_Ran(Sq_List* sqlist);//顺序表任意位置删除
extern void Sq_List_In_Ran(Sq_List* sqlist, int initcapacity, int date);//顺序表任意位置插入
extern int Sq_List_Search(Sq_List* sqlist, int date);//顺序表查找
extern void Sq_List_Destory(Sq_List* sqlist);//顺序表销毁
extern void Sq_List_Print(Sq_List* sqlist);//顺序表打印
extern int Check_NULL(Sq_List* ps);//检查顺序表是否为空